home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-08-22 | 1.6 KB | 38 lines | [TEXT/GEOL] |
- Item 8611967 5-Aug-89 12:02
-
- From: D4132 Farallon, R & D, PRT
-
- To: MACAPP.TECH$ MACAPP Tech
-
- cc: MOOF D4132 MACDTS Rollin, Keith A, APL
-
- Sub: scrolling and offscreens
-
- I’m trying to figure out the best way to integrate MacApp’s implementation of
- scrolling with an application that requires the use of offscreen bitmaps. The
- document I’m trying to display is, in general, too large to keep an offscreen
- bitmap of the whole thing, so my offscreen is only as large as the window,
- which means it has to be scrolled and updated.
-
- The obvious solution is just to overide TScroller.ScrollDraw to scroll my
- offscreen and then blit it to the screen. I’m reluctant to do this since
- ScrollDraw is a rather low-level method which, according to the manual is
- “...rarely overridden, and even more rarely called from application code.” It’s
- sort of reminiscent of patching traps: for a while everyone did it, then it was
- discouraged, frowned upon, and finally almost outlawed.
-
- So my question is two-fold: 1) Is it bad karma to overide low-level methods
- such as ScrollDraw? and if so, 2) what’s a better way to accomplish the desired
- result?
-
- One solution I thought about was switching bitmaps behind ScrollDraw’s back, so
- that it would actually scroll my offscreen for me. Part of the problem with
- this is that it eventually calls my Draw method which has to figure out that a
- portion of the offscreen actually needs redrawing. Ideally, you just want the
- Draw method to be a CopyBits call.
-
- Joe Sensendorf
- Farallon Computing
- D4132
-
-